import request from '@/utils/request'

// 获取跳检规则分配
export function getExemptionruleInfo(id) {
    return request({
        url: `/api/BaseData/Exemptionrule/${id}`,
        method: 'GET'
    })
}

// 获取跳检规则分配列表
export function getExemptionruleList(data) {
    return request({
        url: `/api/BaseData/Exemptionrule`,
        method: 'GET',
        data
    })
}

// 添加跳检规则分配
export function createExemptionrule(data) {
    return request({
        url: '/api/BaseData/Exemptionrule',
        method: 'POST',
        data
    })
}

// 更新跳检规则分配
export function updateExemptionrule(data) {
    return request({
        url: `/api/BaseData/Exemptionrule/${data.id}`,
        method: 'PUT',
        data
    })
}

// 批量删除跳检规则分配
export function delExemptionruleBatch(data) {
    return request({
        url: `/api/BaseData/Exemptionrule/BatchRemove`,
        method: 'POST',
        data
    })
}
// 删除跳检规则分配
export function delExemptionrule(id) {
    return request({
        url: `/api/BaseData/Exemptionrule/${id}`,
        method: 'DELETE'
    })
}
// 获取所有跳检规则分配
export function getExemptionruleAll() {
    return request({
        url: `/api/BaseData/Exemptionrule/All`,
        method: 'GET'
    })
}
// 导出跳检规则分配
export function exportData(data) {
    return request({
        url: `/api/BaseData/Exemptionrule/Actions/Export`,
        method: 'GET',
        data
    })
}
// 导入
export function ImportData(data) {
  return request({
    url: '/api/BaseData/Exemptionrule/ImportData',
    method: 'post',
    data
  })
}
// 导入预览
export function ImportPreview(data) {
  return request({
    url: '/api/BaseData/Exemptionrule/ImportPreview',
    method: 'get',
    data
  })
}
// 模板下载
export function TemplateDownload() {
  return request({
    url: '/api/BaseData/Exemptionrule/TemplateDownload',
    method: 'get'
  })
}